DITROFF
Section: User Commands (1)
Index
Return to Main Contents
NAME
ditroff - text formatting and typesetting
SYNOPSIS
ditroff
[ option ] ...
[ file ] ...
DESCRIPTION
Ditroff
formats text in the named
files
for printing on the printer selected.
Different output devices may be selected with the
environment variables TYPESETTER and PRINTER or
with the -P option.
Output will be processed as specified in the
ditcap
file, for the particular printer selected.
The companion preprocessors, pic, ideal, deqn,
tbl and grn all accept the TYPESETTER and PRINTER environment
variables,
have the -P option,
and access the ditcap file.
.IBTroff's
capabilities are described in the
Nroff/Troff user's manual.
It is a good idea to specify a printer
using one of the environment variables (PRINTER or TYPESETTER),
or by using the
-Pprinter
option for ditroff and each of its preprocessors.
This is advisable since each preprocessor selects a different default
device if none is specified.
The device independent troff (troff_p) and its associated preprocessors
(eqn, grn, tbl, ideal, pic, ...)
access the environment variables (TYPESETTER and PRINTER),
support the
-Pprinter
option,
and access the
ditcap
file when processing troff files.
If no
file
argument is present, the standard input is read.
An argument consisting of a single minus
(-)
is taken to be
a file name corresponding to the standard input.
The options are:
Troff options:
- -Pdev
-
Prepare output for typesetter
dev.
If no printer is specified, the default is the Laser Writer (lw).
The environment variable PRINTER will override the default, and
the environment variable TYPESETTER overrides PRINTER.
A -P option will override all else.
The
ditcap
file is searched for this printer,
and the printer type and other options are set from this file.
- -Ttyp
-
Change the printer type to
typ ,
and don't read the printer type from the ditcap file.
- -Fdir
-
Use font directory
dir
instead of /sprite/lib/ditroff.
This overrides the (fd) characteristic if it is set in the
ditcap
file.
- -Dent
-
Use the ditcap entry for
ent ,
rather than the ditcap entry for
dev .
Thus the ditcap characteristics are read from the ditcap
entry
ent ,
and the output is sent to
dev .
- -t
-
Send the troff_p output to standard output.
If the (ft) characteristic is set in the ditcap file,
then pass the output through this filter before sending it to
standard output.
- -a
-
Send a printable ASCII approximation
of the results to the standard output.
If the (fa) characteristic is set in the ditcap file,
then pass the output through this filter before sending it to
standard output.
- -olist
-
Print only pages whose page numbers appear in the comma-separated list
of numbers and ranges. A range
N-M
means pages N through
M;
an initial -N means from the beginning to page
N;
and a final
N-
means from N to the end.
- -nN
-
Number first generated page
N.
- -mname
-
Prepend the macro file
/sprite/lib/ditroff/tmac.name
to the input
files.
- -raN
-
Set register a (one-character) to
N.
- -i
-
Read standard input after the input files are exhausted.
- -q
-
Disable echoing during a .rd request.
- -debug
-
Print the lines that ditroff would run,
rather than making system calls.
Preprocessing options:
- -tbl
-
Pipe through tbl.
- -eqn
-
Pipe through eqn.
- -seqn
-
Pipe through eqn
using the special characters (in /sprite/lib/ditroff/eqnxxxxx).
- -grn
-
Pipe through grn.
- -pic
-
Pipe through pic.
- -refer
-
Pipe through refer.
- -ideal
-
Pipe through ideal.
Spooling options:
- -h
-
Don't print the burst page.
- -m
-
Send mail upon completion of the printing job.
- -Cname
-
Set the classname on the burst page to
name .
- -Jname
-
Set the jobname on the burst page to
name .
- -#N
-
Print
N
copies of the job.
Some options of
troff
only apply if you have a C/A/T typesetter attached to your system.
These options are here for historical reasons:
- -sN
-
Stop every N pages. troff
stops the phototypesetter every N pages, produces a trailer to allow
changing cassettes, and resumes when the typesetter's start button is pressed.
- -f
-
Refrain from feeding out paper and stopping
phototypesetter at the end of the run.
- -w
-
Wait until phototypesetter is available, if currently busy.
- -b
-
Report whether the phototypesetter is busy or available.
No text processing is done.
- -pN
-
Print all characters in point size N
while retaining all prescribed spacings and motions,
to reduce phototypesetter elapsed time.
PROCESSING
The following details are only important to the user who
wants to set the environment variable DITCAP
and change ditcap entries.
The details of how files are processed is as follows:
( (xx) indicates ditcap characteristics and [ ] indicates
optional parts )
First all files are run through the preprocessors specified.
(we show all preprocessors, but only a few would be used together)
The first
processor receives all the files as input - note that this could be troff_p.
This part of the command line is assembled as follows.
- PRE =
-
refer SFILES | tbl | grn TYFT | \
pic TYFT | ideal TYFT | eqn TYFT |
-
-
Where SFILES = "[(se)] files"
the (se) string being prepended
if the
-seqn
option is selected and
if the (se) characteristic is specified in
the ditcap file.
And TYFT = " -T
typ
[-F
dir
] "
typ
is either specified
in the ditcap file (ty),
or using the
-T
option;
dir
is used if it is specified by the
-F
option or if the (fd) characteristic is specified in the ditcap file.
- NOTE:
-
The preprocessors above and troff_p below
would be the default ones given in the ditcap(5) documentation,
unless appropriate ditcap characteristic are specified in the ditcap file.
- I
-
Standard troff job directed to a printer (-a , -t options not set)
- %
-
PRE troff_p TYFT [(ol)] [troff options] \
[ | (f1) ] [ | (f2) ] [ | (f3) ] [ | (f4) ] \
| lpr -Pdev [spooling options] [(lo)]
- II
-
Using a previewer (as specified in the ditcap file)
- %
-
PRE troff_p TYFT [(op)] [troff options] \
[ | (fp) ] > /tmp/dit$$
- %
-
(pv) /tmp/dit$$
- %
-
/bin/rm -f /tmp/dit$$
- III
-
Using the -t option
- %
-
PRE troff_p TYFT -t [(ot)] [troff options] \
[ | (ft) ] > standard output
- IV
-
Using the -a option
- %
-
PRE troff_p TYFT -a [(oa)] [troff options] \
[ | (fa) ] > standard output
-
-
FILES
/sprite/lib/ditroff/ditcap printer specific info
/sprite/lib/ditroff/tmac.* standard macro files
/sprite/lib/ditroff/dev* font width tables
BUGS
The
-F
option is not very useful since the same directory
must be available on the machine that drives the printer.
SEE ALSO
ditcap(5)
trchange(1) for a list of differences, in
ditroff,
to TROFF commands
J. F. Ossanna,
Nroff/Troff user's manual
B. W. Kernighan,
A TROFF Tutorial
eqn(1), grn(1), ideal(1), pic(1), refer(1),
tbl(1), dterm(1), lpr(1), font(1)
AUTHOR
Greg Heinzinger
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- PROCESSING
-
- FILES
-
- BUGS
-
- SEE ALSO
-
- AUTHOR
-
This document was created by
man2html,
using the manual pages.
Time: 04:54:19 GMT, January 31, 2023